/*
 * Configuration.java
 *
 * Created on 2006 by moon 9:31
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.zll.framework.conf;

import java.net.URL;




public class Configuration
{

    private static String homePath = "";
	private static String packageName = "com.joinhawaii";

    /** 마포구 */
    private static String dbName = "mysql";
    private static String dataSourceName = "jdbc/poolDB";
    private static String wasName = "tomcat";

    public static final int LINE_PER_PAGE = 15;	//한페이지에 몇줄을 표시하는가
    public static final int PAGE_SIZE = 10;		//한화면에 페이지를 몇개를 보여주나


	public static String getHomePath() {
		if ("".equals(homePath)) {
			URL location = Configuration.class.getProtectionDomain().getCodeSource().getLocation();
			String dir = location.getFile();
			homePath = dir.substring(0, dir.indexOf("WEB-INF")-1);
		}

		return homePath;
	}

    public static String getDataSourceName() {
    	return dataSourceName;
    }

    public static String getDbName() {
    	return dbName;
    }

    public static String getWasName() {
    	return wasName;
    }

    public static String getPackageName() {
    	return packageName;
    }
}
